<template>
  <div id="app" :style="appStyle">
    <router-view/>
  </div>
</template>
<script>
import "@/assets/iconfont/iconfont.css";
import {mapState} from 'vuex';
export default {
  name: 'App',
  data () {
    return {
    }
  },
  computed:{
    ...mapState('app', {
      themeList: 'themeList', // 右边 是 app 模块中的某个 state 名称
      currentThemeActive: 'currentThemeActive',
      // 添加更多的 state 映射
    }),
    appStyle(){
      return {
        '--headerBgColor': this.themeList[this.currentThemeActive].headerBgColor,
      }
    }
  },
  mounted(){
    console.log(this.themeList);
  },
  methods:{
    
  }
}
</script>
<style>
#app {
  width: 100%;
  height: 100%;
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}

nav {
  padding: 30px;
}

nav a {
  font-weight: bold;
  color: #2c3e50;
}

nav a.router-link-exact-active {
  color: #42b983;
}
</style>
